﻿@model PagedList<BulletinModel.BulletinItem>
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "Details";
}
    <style type="text/css">
         .uploadify-button
        {
            background-color: transparent;
            border: none;
            padding: 0;
        }
        .uploadify:hover .uploadify-button
        {
            background-color: transparent;
        }
    </style>
@*    <link href="@Url.Content("~/Scripts/uploadify-v3.1/uploadify.css")" rel="stylesheet" type="text/css" />*@
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
@*    <script src="@Url.Content("~/Scripts/uploadify-v3.1/jquery.uploadify-3.1.min.js")" type="text/javascript"></script>*@
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<h2>公示名单</h2>

       @Html.ValidationSummary(true)
    <div id="operate" class="fromSubject">
 @Html.ActionLink("返回", "index", "Bulletin", new { id=ViewData["BulletinYaMa"]}, "")
      @if (User.Identity.Name != "") 
      { 
     @Html.ActionLink("新建", "CreateBulletinItem", "BulletinItem", new { BulletinID=ViewData["BulletinID"],BulletinYaMa=ViewData["BulletinYaMa"]}, "")
      }
      @if (User.Identity.Name != "") 
      {     <span>项目管理： </span>
          <a href="@Url.Content("~/Content/DemoFolder/demo.xlsx")">点击下载导入模板</a> @Html.ActionLink("编辑","Edit", "Bulletin",new { BulletinID=ViewData["BulletinID"],BulletinYaMa= ViewData["BulletinYaMa"],YeMa=ViewData["YeMa"]},null) 
  
      using (Html.BeginForm("Details", "BulletinItem", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
         <input type="submit" value=" 导入 " />
        <input type="file" name="fileData" class="fileNew" id="fileNew" onchange="document.getElementById('textNew').value=this.value" />
         <input type="button" class="btnNew" value="浏览..." /> 
       <input type="text" name="textNew" id="textNew" class="textNew" readonly="true" /> 
     @Html.Hidden("BulletinID",ViewData["BulletinID"])
        @Html.Hidden("BulletinYaMa",ViewData["BulletinYaMa"])
                                      
    }
 }
</div>
<fieldset class="show">
        <div class="display-label">
            项目名称：
        </div>
        <div class="display-field">
            @ViewData["BulletinName"]
        </div>
        <div class="display-label">
            描述：
        </div>
        <div class="display-field">
            @ViewData["BulletinDescription"]
        </div>
        <div style="clear:both"></div>
@*       @Html.ValidationSummary(true)
    <input type="file" id="file_upload" name="file_upload" />
    <a href="javascript:$('#file_upload').uploadify('upload','*');">上传</a> 
    <a href="javascript:$('#file_upload').uploadify('cancel', '*');">取消</a>*@
 
@*    @Html.ActionLink("导入", "AddBulletinItem", new {BulletinID=ViewData["BulletinID"] })*@
<table width="900" class="oddTable" style="margin-bottom:10px;margin-top:20px;">
    <tr>
        <th>名称</th>
        <th>区县</th>
        <th>单位</th>
        <th>姓名</th>
        <th>结果</th>
    </tr>

@foreach (var item in Model) {

    <tr>
        <td style="text-align:center;">
@*   @using (Html.BeginForm("giveComment", "BulletinItem",FormMethod.Post))
{
    @Html.Hidden("ProjectSN",item.ProjectSN) 
        @Html.Hidden("YeMa",ViewData["YeMa"])    
           @Html.Hidden("BulletinYaMa",ViewData["BulletinYaMa"])    
       
      <button type="submit" class="btn">@item.ProjectTitle</button>                                                    
}*@
 @Html.ActionLink(item.ProjectTitle, "giveComment", "BulletinItem", new { ProjectSN=item.ProjectSN,YeMa=ViewData["YeMa"],BulletinYaMa=ViewData["BulletinYaMa"]}, "")
        </td>
@*        <td>
            @item.ProjectTitle
   <input type="submit" value=item.ProjectTitle class="btn" />
        </td>*@
        <td>@item.County</td>
        <td>@item.School</td>
        <td>@item.TeacherName</td>
        <td>@item.Conclusion</td>

    </tr>

}
</table>
        @Html.Pager( Model ,new PagerOptions()
        {
    PageIndexParameterName = "id",
    //ShowPageIndexBox = true
    //ShowGoButton = true,
    //PageIndexBoxWrapperFormatString = "跳转到第{0}页"
        })
</fieldset>